<template>
	<view>
		<!-- 隐私政策和用户协议公共页面 -->
		<view class="content" v-html="htmlData"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				htmlData:''
			};
		},
		onReady(e) {

		},
		onLoad(e) {
			console.log(e,"s1sm,1");
			uni.setNavigationBarTitle({
				title: e.type==1?'隐私政策':'用户协议'
			});
			this.getAgreementFn(e.type)
		},
		methods:{
			// 隐私政策 用户协议
			getAgreementFn(type) {
				this.$http('/v1/users/agreement').then(res => {
				
					if (res.code == 0) {
						this.htmlData = type==1?res.data.yinsizhengce.value:res.data.yonghuxieyi.value;
						// this.$showToast('修改成功');
					} else {
						this.$showToast(res.msg)
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
 .content{
	 padding: 60upx 40upx;
 }
</style>
